import Vue from 'vue'
import VueRouter from 'vue-router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Manager from "@/views/Manager";

Vue.use(VueRouter)
Vue.use(ElementUI,{size:'mini'})
Vue.config.productionTip = true

const routes = [
  {
    path: '/',
    name: 'Login',
    component: ()=>import('../views/Login')
  },
  {
    path: '/manager',
    name: 'Manager',
    component: Manager,
    // redirect: 'home',
    children:[
      {path:'/home',component:()=>import('../views/Home')},
      {path:'/user',component:()=>import('../views/User')}
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router

